<?php

class extra_data_m_order extends a_base_model_datamapper {

    public function __construct($id=null) {
        $this->table = 'order_extra_data';
        $this->has_one = array(
        );
        $this->has_one['order_m_order'] = array(
            'class' => 'order_m_order',
            'join_other_as' => 'order',
            'join_self_as' => 'extra'
        );

        parent::__construct($id);
    }

    public function get_field_details(){
        $obj =  new details_fields_m_order();
        return $obj->get_by_id($this->field_id)->exists() ? $obj : NULL ;
    }

}
?>